#!/bin/bash
#auto monitor check url
#2017-04-11
############
LIST="list.txt"

echo "Please wait:"
for ((i=1;i<=4;i++));do echo -e -n "\033[32m-\033[0m";sleep 1;done
echo
while read line

do
	wget -c $line >>/dev/null 2>&1
	if [ $? -eq 0 ];then
		echo -e "\033[32mThe URL $line is alive.\033[0m"
		echo 
	else
		echo "URL warn for SA"|mail -s "URL warning for SA,please check."  hk@163.com
	fi
done <$LIST
